An imaging apparatus such as a digital still camera employs an analog frontend to convert an image captured by an imaging sensor from analog signals into digital signals, followed by applying various types of image processing to the digital image data. Image processing such as filtering is applied to image data that is retrieved from an SDRAM (synchronous dynamic random access memory) serving as a frame memory after the image data is written to the SDRAM.
The size of entire image data written to the SDRAM may be N pixels in the horizontal direction and M lines in the vertical direction. In such a case, the use of a filter having a vertical size of L pixels means that data of N pixels arranged in the horizontal direction for one line may be retrieved for L lines equal to the vertical size of the filtering process, thereby allowing the filtering process to be performed with respect to all the data in the horizontal direction. However, this arrangement may necessitate the provision of a memory having a size of N×L pixels in the filtering process unit that performs the filtering process.
In order to reduce the size of a memory provided in the filtering process unit, image data may be divided into a plurality of rectangular areas, and a filtering process may be applied to the image data of each rectangular area that is retrieved separately from an SDRAM. For example, one horizontal line may be divided by 16. With the vertical size of a filter being L pixels, it suffices for the filtering process unit to have a memory having a size of N/16 pixels by L pixels. However, calculating the output values of a filtering process at the borders of a rectangular area involves the use of pixel values in an area that is situated immediately outside the rectangular area. Such an area will hereinafter be referred to as a flanking area. Accordingly, retrieving the image data of a rectangular area from an SDRAM may be accompanied by a process of retrieving the image data of a flanking area that is to be added to the outside of the borders, followed by supplying both of the retrieved data to the filtering process unit.
FIG. 1 is a drawing illustrating different positional relationships between a rectangular area and a flanking area when retrieving data from an SDRAM. FIG. 1 illustrates a rectangular area 10 and flanking areas 11a through 11i. As will be described in the following, positional relationships between the rectangular area 10 retrieved from an SDRAM and a flanking area thereof are classified into 9 different patterns.
When the rectangular area 10 situated at the top left corner of the entire image data is retrieved, the flanking area retrieved in conjunction therewith is a portion of the rectangular area situated on the immediate right of the rectangular area 10 and a portion of the rectangular area situated immediately below the rectangular area 10. In this case, the data retrieved from the SDRAM include the rectangular area 10 and the flanking area 11a as illustrated at the top left corner in FIG. 1. The same or similar retrieval operation is performed when the rectangular area 10 situated at other corners is retrieved. The data retrieved from the SDRAM in such a case include the rectangular area 10 and the flanking area 11c as illustrated at the top right corner in FIG. 1, the rectangular area 10 and the flanking area 11g as illustrated at the bottom left corner in FIG. 1, or the rectangular area 10 and the flanking area 11i as illustrated at the bottom right corner in FIG. 1.
When the rectangular area 10 situated on the upper edge of the entire image data is retrieved, the flanking area retrieved in conjunction therewith is a portion of the rectangular area situated on the immediate left of the rectangular area 10, a portion of the rectangular area situated on the immediate right of the rectangular area 10, and a portion of the rectangular area situated immediately below the rectangular area 10. In this case, the data retrieved from the SDRAM include the rectangular area 10 and the flanking area 11b as illustrated at the top center in FIG. 1. The same or similar retrieval operation is performed when the rectangular area 10 situated on other edges is retrieved. The data retrieved from the SDRAM in such a case include the rectangular area 10 and the flanking area 11d as illustrated on the middle left in FIG. 1, the rectangular area 10 and the flanking area 11f as illustrated on the middle right in FIG. 1, or the rectangular area 10 and the flanking area 11h as illustrated at the bottom center in FIG. 1.
Further, when the rectangular area 10 in contact with none of the edges of the entire image data (i.e., the rectangular area 10 fully surrounded by other rectangular areas 10) is retrieved, the flanking area retrieved in conjunction therewith is a portion of the 8 rectangular areas in the immediate proximity of the retrieved rectangular area 10. In this case, the data retrieved from the SDRAM include the rectangular area 10 and the flanking area 11e as illustrated at the center in FIG. 1.
As described above, the positional relationship between the rectangular area 10 and the flanking area retrieved together therewith varies depending on the position of the rectangular area 10 retrieved from the SDRAM relative to the entire image data. Specifically, there are 9 different positional patterns as illustrated in FIG. 1. It thus follows that a retrieval unit for retrieving the image data of the rectangular area 10 from the SDRAM may need to control a read address in response to the relative position of the rectangular area 10 that is to be retrieved, such that data retrieval is properly performed with respect to the 9 different positional patterns. Further, the size of the image data to be retrieved may need to be changed depending on the position of the rectangular area 10 that is to be retrieved. As a result, a retrieval process ends up involving complex control. Designing a retrieval unit performing such complex control results in a cost increase and an increase in design time.
A filtering process unit outputs image data having the same size as the rectangular area 10 when outputting the result of a filtering process. Because of this, the fact that the positional relationship between the rectangular area 10 and the flanking area varies as illustrated in FIG. 1 means that there is also a change in the positional relationship between the input into the filtering process unit and the output from the filtering process unit.
FIG. 2 is a drawing illustrating positional relationships between the input image data and output image data of a filtering process unit. FIG. 2 illustrates input image data 12a through 12i input into a filtering process unit and the rectangular areas 10 included therein. The rectangular area 10 will be the output image data of the filtering process unit. As will be described below, the positional relationships between the input image data and the output image data are classified into four different patterns.
When the rectangular area 10 situated at the top left corner of the entire image data is subjected to the filtering process, the positional relationship between the input image data and output image data of the filtering process unit is illustrated at the top left in FIG. 2 as the positional relationship between the input image data 12a and the rectangular area 10. In this case, the coordinates of the top left corner of the input image data 12a coincide with the coordinates of the top left corner of the output image data.
When the rectangular area 10 situated on the top edge of the entire image data is subjected to the filtering process, the positional relationship between the input image data and output image data of the filtering process unit is illustrated at the top center in FIG. 2 as the positional relationship between the input image data 12b and the rectangular area 10. When the rectangular area 10 situated at the top right corner of the entire image data is subjected to the filtering process, the positional relationship between the input image data and output image data of the filtering process unit is illustrated at the top right in FIG. 2 as the positional relationship between the input image data 12c and the rectangular area 10. In this case, the coordinates of the top left corner of the output image data are displaced to the right in the horizontal direction relative to the coordinates of the top left corner of the input image data.
When the rectangular area 10 situated on the left edge of the entire image data is subjected to the filtering process, the positional relationship between the input image data and output image data of the filtering process unit is illustrated on the middle left in FIG. 2 as the positional relationship between the input image data 12d and the rectangular area 10. When the rectangular area 10 situated at the bottom left corner of the entire image data is subjected to the filtering process, the positional relationship between the input image data and output image data of the filtering process unit is illustrated at the bottom left in FIG. 2 as the positional relationship between the input image data 12g and the rectangular area 10. In these cases, the coordinates of the top left corner of the output image data are displaced downwardly in the vertical direction relative to the coordinates of the top left corner of the input image data.
In the cases other than those described above, the positional relationships between the input image data and output image data of the filtering process unit are as illustrated by four patterns situated toward the bottom right corner in FIG. 2, i.e., the positional relationships between the input image data 12e, 12f, 12h, and 12i and the respective rectangular areas 10. In these cases, the coordinates of the top left corner of the output image data are displaced toward the lower right relative to the coordinates of the top left corner of the input image data.
As described above, the positional relationship between the input image data and output image data of the filtering process unit varies depending on the position of the rectangular area 10 retrieved from the SDRAM relative to the entire image data. Specifically, there are 4 different positional patterns as illustrated in FIG. 2. The filtering process unit may thus generate output image data by discriminating the four different positional patterns from each other depending on the position of the rectangular area 10 that is to be processed. As a result, the filtering process ends up involving complex output coordinate control. Designing a filtering process unit performing such complex control results in a cost increase and an increase in design time.